///*
// * Copyright (c) 2018-2999 山东卯时信息科技有限公司 All rights reserved.
// *
// * https://www.gz-maoshi.com/
// *
// * 未经允许，不可做商业用途！
// *
// * 版权所有，侵权必究！
// */
//
//package com.maoshi.shop.seckill.comment.listener;
//
//
//import com.maoshi.shop.bean.enums.OrderType;
//import com.maoshi.shop.bean.event.CancelOrderEvent;
//import com.maoshi.shop.bean.order.CancelOrderOrder;
//import lombok.AllArgsConstructor;
//import org.springframework.context.event.EventListener;
//import org.springframework.core.annotation.Order;
//import org.springframework.stereotype.Component;
//
///**
// * 取消订单事件
// */
//@Component("seckillCancelOrderListener")
//@AllArgsConstructor
//public class CancelOrderListener {
//
//
//    private final SeckillOrderService seckillOrderService;
//
//    @EventListener(CancelOrderEvent.class)
//    @Order(CancelOrderOrder.SECKILL)
//    public void seckillCancelOrderEventListener(CancelOrderEvent event) {
//        String orderNumber = event.getOrder().getOrderNumber();
//        // 不是秒杀订单直接返回
//        if (!OrderType.SECKILL.value().equals(event.getOrder().getOrderType())) {
//            return;
//        }
//
//        seckillOrderService.cancelUnpayOrderByOrderNumber(orderNumber);
//    }
//
//}
